﻿using Medianamik.Core.DAL;
using Medianamik.Core.DAL.Repositories;
using Medianamik.Core.DAL.Services;
using SubSonic;

namespace Medianamik.UI.Web.Shop.Data.Repositories
{
    public class TaxRepository<TCollection, TItem> : 
        MedianamikRepository<TCollection, TItem>, ITaxRepository<TItem> 
        where TItem : Interfaces.ITax, IRecordBase, new() 
        where TCollection : ICollectionWithChildren<TCollection, TItem>, new()
    {
        public TaxRepository(ICultureService cultureService, IContentStateService contentStateService, INodeMapper nodeMapper) : base(cultureService, contentStateService, nodeMapper)
        {
        }
    }

    public class TaxRepository : TaxRepository<TaxCollection, Tax>, ITaxRepository
    {
        public TaxRepository(ICultureService cultureService, IContentStateService contentStateService, INodeMapper nodeMapper)
            : base(cultureService, contentStateService, nodeMapper)
        {
        }
    }

    public interface ITaxRepository<T> : IMedianamikRepository<T>
        where T : Interfaces.ITax
    {
    }

     public interface ITaxRepository: ITaxRepository<Tax>
     {}
}
